package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.th.supcom.pds.domain.pojo.InpPhamApplyDetailSummary;
import com.th.supcom.pds.domain.pojo.PhamStockOnwayTable;
import com.th.supcom.pds.domain.vo.PhamStockOnwayTableVO;
import com.th.supcom.pds.impl.dao.PhamStockOnwayTableMapper;
import com.th.supcom.pds.impl.manager.PhamStockOnwayTableManager;

/**
 * PhamStockOnwayTable 管理接口实现.
 * 
 * 本表用于记录每库房每库存药品（品、规、厂商为主键）。包装、批次、有效期等质量与库存流通管理的信息。 2014-03-19 经商量去除入库单相关信息字段。.
 */
public class PhamStockOnwayTableManagerImpl implements PhamStockOnwayTableManager
{
    public static final String TAB_PHAM_STOCK_ONWAY_TABLE = "PHAM_STOCK_ONWAY_TABLE";

    private PhamStockOnwayTableMapper m_phamStockOnwayTableMapper;

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    /**
     * 默认的构造函数.
     */
    public PhamStockOnwayTableManagerImpl ()
    {

    }

    /**
     * 获取PhamStockOnwayTableMapper.
     * 
     * @return PhamStockOnwayTableMapper.
     */
    public PhamStockOnwayTableMapper getPhamStockOnwayTableMapper ()
    {
        return m_phamStockOnwayTableMapper;
    }

    @Override
    public List <PhamStockOnwayTableVO> findOffsetPhamList (List <InpPhamApplyDetailSummary> list)
    {
        return m_phamStockOnwayTableMapper.findOffsetPhamList (list);
    }

    /**
     * 注入PhamStockOnwayTableMapper.
     * 
     * @param phamStockOnwayTableMapper set phamStockOnwayTableMapper.
     */
    public void setPhamStockOnwayTableMapper (PhamStockOnwayTableMapper phamStockOnwayTableMapper)
    {
        m_phamStockOnwayTableMapper = phamStockOnwayTableMapper;
    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    @Override
    public PhamStockOnwayTable getPhamStockOnwayTableByID (Long id)
    {
        return m_phamStockOnwayTableMapper.getPhamStockOnwayTableByID (id);
    }

    @Override
    public Long getPhamStockOnwayTableSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (TAB_PHAM_STOCK_ONWAY_TABLE);
    }

    @Override
    public List <PhamStockOnwayTable> findPhamStockOnwayTableListByExample (PhamStockOnwayTable phamStockOnwayTable)
    {
        return m_phamStockOnwayTableMapper.findPhamStockOnwayTableListByExample (phamStockOnwayTable);
    }

    @Override
    public int findPhamStockOnwayTableCountByExample (PhamStockOnwayTable phamStockOnwayTable)
    {
        return m_phamStockOnwayTableMapper.findPhamStockOnwayTableCountByExample (phamStockOnwayTable);
    }

    @Override
    public List <PhamStockOnwayTable> findPhamStockOnwayTableListByMap (Map <String, Object> params)
    {
        return m_phamStockOnwayTableMapper.findPhamStockOnwayTableListByMap (params);
    }

    @Override
    public List <PhamStockOnwayTable> findPhamStockOnwayTablePagingByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_phamStockOnwayTableMapper.findPhamStockOnwayTablePagingByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findPhamStockOnwayTableCountByMap (Map <String, Object> params)
    {
        return m_phamStockOnwayTableMapper.findPhamStockOnwayTableCountByMap (params);
    }

    @Override
    public int modifyPhamStockOnwayTable (PhamStockOnwayTable phamStockOnwayTable)
    {
        return m_phamStockOnwayTableMapper.modifyPhamStockOnwayTable (phamStockOnwayTable);
    }

    @Override
    public int modifyPhamStockOnwayTableByExample (PhamStockOnwayTable phamStockOnwayTable)
    {
        return m_phamStockOnwayTableMapper.modifyPhamStockOnwayTableByExample (phamStockOnwayTable);
    }

    @Override
    public int removePhamStockOnwayTableByID (Long id)
    {
        return m_phamStockOnwayTableMapper.removePhamStockOnwayTableByID (id);
    }

    @Override
    public int removePhamStockOnwayTableByMap (Map <String, Object> params)
    {
        return m_phamStockOnwayTableMapper.removePhamStockOnwayTableByMap (params);
    }

    @Override
    public void addPhamStockOnwayTable (PhamStockOnwayTable phamStockOnwayTable)
    {
        m_phamStockOnwayTableMapper.addPhamStockOnwayTable (phamStockOnwayTable);
    }

    /** 日志记录器. */
    public static final Logger s_logger = LoggerFactory.getLogger (PhamStockOnwayTableManagerImpl.class);

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2015, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

}